package com.blackhorse.xml.dao;

import com.blackhorse.domain.QueryVo;
import com.blackhorse.domain.User;

import java.util.List;

public interface UserMapper {
    public List<User> findAll();

    public void saveUser(User user);

    public void updateUser(User user);

    public void deleteUserById(int id);

    public User findById(int id);

    public List<User> findByName(String name);

    public int findTotal();

    public List<User> findUserByVo(QueryVo vo);

    //使用动态sql按照不确定个数的条件查询
    public List<User> findUserByCondition(User user);

    //使用动态sql按照不确定个数的条件查询
    public List<User> findUserInIds(QueryVo vo);

    //一对多关联查询
    public List<User> findAllUserWithAccount();

    //多对多关联查询
    public List<User> findAllwithRoles();

    //一对多关联查询，使用延迟加载
    public List<User> findAllUserWithAccountByLazyLoading();
}
